﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Management.master" AutoEventWireup="true" CodeFile="reportsuser_account_unlock.aspx.cs" Inherits="User_UserAccess_reportsuser_account_unlock" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:ScriptManager runat="server" ID="smgrUser" EnablePartialRendering="true">
    </asp:ScriptManager>
    <div class="contents">
        <table width="100%" cellpadding="3" cellspacing="0" border="0">
            <tr>
                <td colspan="2">
                    <h1>
                        Reports User Account Unlock</h1>
                </td>
            </tr>
            <tr id="trSearch" runat="server">
                <td width="950">
                    <b>User</b> :
                    <asp:DropDownList ID="ddlUser" runat="server" AutoPostBack="true" 
                        onselectedindexchanged="ddlUser_SelectedIndexChanged"></asp:DropDownList>&nbsp;&nbsp;
                    <asp:CheckBox runat="server" Text="Is Lock Account" ID="chkLock" />&nbsp;
                    <asp:Button ID="btnUnLock" runat="server" Text="Update" OnClick="btnUnLock_Click" />
                    <div style="display:none;">
                        <asp:Label ID="lblUserStatusId" runat="server"></asp:Label>
                    </div>
                    </span>
                </td>
                <td>&nbsp;</td>
            </tr>
            <tr>
                <td colspan="2">
                    <h3>
                        Reports User Account Details</h3>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <asp:GridView ID="grvUserAccount" runat="server" AllowPaging="False" AllowSorting="True"
                        AutoGenerateColumns="False" CellPadding="2" CssClass="progridstyle" EmptyDataText="There are no data records to display."
                        GridLines="None" DataKeyNames="UserStatusId" DataSourceID="sqlDsUserAccount" 
                        onrowdatabound="grvUserAccount_RowDataBound" >
                        <FooterStyle />
                        <PagerStyle />
                        <Columns>
                            <asp:BoundField DataField="UserStatusId" HeaderText="UserStatusId" Visible="false" />
                            <asp:BoundField DataField="Name" HeaderText="Name" ItemStyle-Width="250px" />
                            <asp:BoundField DataField="Email" HeaderText="Email" ItemStyle-Width="350px" />
                            <asp:TemplateField HeaderText="Password" ItemStyle-Width="150px">
                                <ItemTemplate>
                                    <asp:Label ID="lblPassword" runat="server" Text='<%# GetPassword(Eval("AuthCode").ToString(),Eval("CEID").ToString()) %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="AccountLock" HeaderText="Account Locked" ItemStyle-Width="150px"  />
                            <asp:BoundField DataField="ModifiedDate" DataFormatString="{0:dd/MM/yyyy hh:mm:ss tt}" ItemStyle-Width="150px" HeaderText="LastLogin Date/Time"
                                SortExpression="ModifiedDate">
                                <ItemStyle Width="150px"></ItemStyle>
                            </asp:BoundField> 
                        </Columns>
                        <FooterStyle />
                        <PagerStyle />
                        <SelectedRowStyle />
                        <HeaderStyle CssClass="admin_gridheader" />
                        <EditRowStyle />
                        <AlternatingRowStyle CssClass="admin_gridodd" />
                        <RowStyle CssClass="admin_grideven" />
                    </asp:GridView>
                    <asp:SqlDataSource ID="sqlDsUserAccount" runat="server" ConnectionString="<%$ ConnectionStrings:GGR_DB_ReportConnectionString %>"
                        SelectCommand="sprocCXTHReportsUserAccountStatusSelectItem" SelectCommandType="StoredProcedure">
                            <SelectParameters>
                                <asp:ControlParameter ControlID="ddlUser" Name="CEID" PropertyName="SelectedValue" Type="Int64" />
                            </SelectParameters>                        
                    </asp:SqlDataSource>
                </td>
            </tr>
        </table>
    </div>
</asp:Content>

